// AnyCADView.cpp : implementation of the CAnyCADView class
//

#include "stdafx.h"
#include "AnyCAD.h"

#include "AnyCADDoc.h"
#include "AnyCADView.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CAnyCADView

IMPLEMENT_DYNCREATE(CAnyCADView, CView)

BEGIN_MESSAGE_MAP(CAnyCADView, CView)
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, OnFilePrintPreview)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
END_MESSAGE_MAP()

// CAnyCADView construction/destruction

CAnyCADView::CAnyCADView()
{
	// TODO: add construction code here


}

CAnyCADView::~CAnyCADView()
{

}

BOOL CAnyCADView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

// CAnyCADView drawing

void CAnyCADView::OnDraw(CDC* /*pDC*/)
{
	CAnyCADDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: add draw code for native data here

}


// CAnyCADView printing

void CAnyCADView::OnFilePrintPreview()
{
	BCGPPrintPreview (this);
}

BOOL CAnyCADView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CAnyCADView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CAnyCADView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}


// CAnyCADView diagnostics

#ifdef _DEBUG
void CAnyCADView::AssertValid() const
{
	CView::AssertValid();
}

void CAnyCADView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CAnyCADDoc* CAnyCADView::GetDocument() const // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAnyCADDoc)));
	return (CAnyCADDoc*)m_pDocument;
}
#endif //_DEBUG


// CAnyCADView message handlers
